package com.game.performers;

import com.game.base.Performer;
import com.game.states.ActionState;
import com.game.states.StateFactory;

/**
 * 行动者
 * @author chzcb
 * @email chzcb2008@gmail.com
 * @date 2011-8-31
 *
 */
public class Actor extends Performer {
	private static final long serialVersionUID = 423484170969536164L;

	private String name = "Actor";
	public int sex;
	public int role;
	/**
	 * 1:正常
	 * 2:删除
	 */
	public int status = 1;
	
	/**
	 * x 坐标
	 */
	public int x;
	
	/**
	 * y 坐标
	 */
	public int y;
	
	/**
	 * z 坐标
	 */
	public int z;
	
	/**
	 * 所在区域
	 */
	public int area;
	
	private ActionState curstate;
	
	public Actor(){
		super();
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * 唤醒角色
	 */
	public void wakeup(){
		this.curstate = StateFactory.createState(StateFactory.ActionStand);
	}
	
	/**
	 * 执行动作
	 * @param state 状态
	 */
	public void playAction(ActionState state){
		
	}
	
	public ActionState getState(){
		return curstate;
	}
	
	@Override
	public String toString() {
		return "[Actor(id="+this.id+",pid="+this.pid+",children="+this.children+",name="+this.name+")]";
	}
}
